package com.health.test;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
 
public class CacheInit {

	public static  List<String> readFileByLines(String fileName) {
        File file = new File(fileName);
        List<String> linesList = new ArrayList<String>();
        BufferedReader reader = null;
        try {
            reader = new BufferedReader(new FileReader(file));
            String tempString = null;
            int line = 1;
            
            // �?��读入�?��，直到读入null为文件结�?
            while ((tempString = reader.readLine()) != null) {
                // 显示行号
                linesList.add(tempString);
                line++;
            }
            reader.close();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e1) {
                }
            }
        }
        return linesList;
    }

	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		List<String> nickNames = readFileByLines("d:\\temp\\nick.txt");
//		System.out.println(UserPropertiesFactory.getInstance().addNickname(nickNames.toArray(new String[nickNames.size()])));
		
		List<String> ll = readFileByLines("d:\\temp\\pl.txt");
		 
	}

}
